/*
 * @Author: quit
 * @Date: 2023-02-24 11:01:16
 * @LastEditTime: 2023-02-24 17:33:11
 * @Descripttion:
 * @notice:
 */
import React from 'react'
class useState extends React.Component {
    state = {
        count: 0
    }

    addCount() {
        this.setState({
            count: this.state.count + 1
        })
    }

    render() {
        return (
            <div>
                <div>当前count值为:{this.state.count}</div>
                <button
                    onClick={() => {
                        this.addCount()
                    }}
                >
                    count + 1
                </button>
            </div>
        )
    }
}
export default useState
